package com.cdy.jxc_project.controller;

import com.cdy.jxc_project.domain.TGoodsType;
import com.cdy.jxc_project.domain.TMenu;
import com.cdy.jxc_project.json.R;
import com.cdy.jxc_project.service.TGoodsTypeService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/*
 * @Project:jxc_project
 * @Author:cdy(缘生)
 * @Motto:放下杂念,只为迎接明天更好的自己
 * @Date:2023/4/23 11:20
 * */
@RestController
@RequestMapping("/tGoodsType")
public class TGoodsTypeController {

    @Resource
    private TGoodsTypeService tGoodsTypeService;

    @PostMapping("/tGoodsTypeQuery/{id}")
    public R tGoodsTypeQuery(@PathVariable Integer id){
        List<TGoodsType> tGoodsTypeList = tGoodsTypeService.tGoodsTypeQuery(id);
        return R.ok().message("菜单查询成功").data("goodsTypeList",tGoodsTypeList);
    }
}
